package com.lucweb.service.impl;

import com.lucweb.dao.JctaskDao;
import com.lucweb.entity.TaskJc;
import com.lucweb.service.JcService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("jcService")
public class JcServiceImpl implements JcService {



    @Resource
    private JctaskDao jctaskDao;


    @Override
    public String newJcTask() {

        return this.jctaskDao.jcTaskNumber();
    }

    @Override
    public void saveOrUpdate(TaskJc taskJc) {


        jctaskDao.saveOrUpdate(taskJc);

    }

    @Override
    public TaskJc getJctaskById(int taskId) {
        return this.jctaskDao.getJcTaskById(taskId);
    }

    @Override
    public boolean deleteJctask(int taskId) {
        jctaskDao.deleteJctask(taskId);
        return true;
    }

    @Override
    public List<TaskJc> showTaskByName(String companyName){
        return this.jctaskDao.jcTask(companyName);
    }



}
